<?php
return array(
	'attributeLabels' => array(
		'worker_name' => '用户名',
		'worker_password' => '密码',
		'worker_id' => '所属工作人员',
		'worker.worker_name' => '所属工作人员',
		'purview' => '权限',
	),	
	
	'rules'=>array(
		array('worker_name, worker_password, worker_id', 'required'),
		array('worker_name','unique'),
		array('worker_name,worker_password', 'length', 'max'=>32,'min'=>6),
	),
	
	'behaviors' => array(
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'worker_id',
			),
			'adminIgore' => false,
		),
		'uidResolver' => array(
			'class' => 'application.behaviors.LyAutoIdBehavior',
			'uid' => 'worker_id'
		),
	),
	
	'relations' => array(
		'worker' => array(ActiveRecord::BELONGS_TO, 'WorkerAccount', 'worker_id'),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);